import java.awt.Graphics;
import java.awt.Image;
import java.awt.Rectangle;

public class MyButton extends Rectangle {
	Image img;
	
	public MyButton(int x, int y, Image img) {
		this.x = x;
		this.y = y;
		this.img = img;
		this.width = img.getWidth(null);
		this.height = img.getHeight(null);
	}
	
	public void draw (Graphics g) {
		g.drawImage(img, x, y, null);
	}
}
